feat: Add health check bridge (Python checker + Web UI dashboard)#1
Open
lairulan wants to merge 1 commit into
Open
feat: Add health check bridge (Python checker + Web UI dashboard)#1lairulan wants to merge 1 commit into
lairulan wants to merge 1 commit into
Conversation
Adds a bridge layer that spawns an external Python health checker and displays the results in a new "健康" (Health) tab. The checker evaluates skills across 4 dimensions (code quality, git sync, runtime health, activity) and outputs JSON consumed by the frontend. New files: - server/bridge/checker.ts — spawns Python process, caches results - server/routes/health.ts — 4 API endpoints (results/status/run/skill) - web/src/hooks/useHealth.ts — React hook for health data - web/src/components/HealthDashboard.tsx — health dashboard UI Modified: - server/index.ts — register health routes, rename /api/health → /api/ping - web/src/App.tsx — add "健康" view tab with HealthDashboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
server/bridge/checker.ts) that spawns an external Python health checker process and caches the JSON results indata/last-check.json/api/health/results,/api/health/status,/api/health/run,/api/health/skill/:name) for the frontend to consumeNew files
server/bridge/checker.tspython3 checker/main.py --json, reads JSON output, manages running stateserver/routes/health.tsweb/src/hooks/useHealth.tsweb/src/components/HealthDashboard.tsxModified files
server/index.ts/api/health→/api/pingto avoid conflict, exportbroadcast()web/src/App.tsxuseHealthhook, "健康" tab button, health view rendering branch.gitignoredata/last-check.jsonArchitecture
Screenshots
The health dashboard displays:
Test plan
npm run dev→ verify all existing views (Skills, 相似检测, 仪表盘) still workchecker/main.pywith--jsonsupport → click "Run Check" → verify results display/api/pingstill returns{ status: 'ok' }npm run buildcompletes without TypeScript errors